<?php
namespace Admin\Controller;

class IndexController extends CommenController  {
    public function index(){
        //显示模板文件
		$date = $this->_get_format_time();
		$this->assign('date',$date);
        $this->display();
    }
	/**
	 * 获取服务器当前格式化时间，包括年月日和星期
	 */
	private function _get_format_time(){
		$arr = array();
		//获取年月日
		$date = date('Y年n月j日');
		$arr['date'] = $date;
		// 获取周几
		$today = getdate();
		$week = $today['wday'];
		$weekarr = array('日','一','二','三','四','五','六');
		$weekday = $weekarr[$week];
		$arr['weekday'] = $weekday;
		return $arr;
	}
}